{extend name="admin@public:base" /}
{block name="main-row-content"}
<div class="page-header">
	<h3 class="widget-title grey lighter">
		<i class="ace-icon fa fa-leaf green"></i>
		系统设置
	</h3>
</div><!-- /.page-header -->
<div class="row">
    <div class="builder-tabs builder-form-tabs mb-20">
        <ul class="nav nav-tabs">
           <li class=""><a href="{:url('admin/sys/sys_basic_set')}">基本</a></li>
            <li class=""><a href="{:url('admin/sys/sys_basic_sys')}">系统</a></li>
            <li class="active"><a href="{:url('admin/sys/sys_upload_set')}">上传</a></li>
            <li class=""><a href="{:url('admin/sys/sys_basic_weblog')}">日志</a></li>
            <li class=""><a href="{:url('admin/sys/sys_basic_database')}">数据库</a></li>
       </ul>
    </div>
	<div class="col-xs-12 padding-top-30">
		<!-- PAGE CONTENT BEGINS -->
		<form class="form-horizontal ajaxForm2" action="{:url('admin/Sys/sys_upload_runset')}" method="post" enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">上传路径：</label>
				<div class="col-sm-10">
				    <input    type="text" placeholder="上传路径"  class="col-xs-4" name="upload_path" value="{$web_upload.upload_path}"/>
				</div>
				
			</div>
			<div class="space-4"></div>
		    <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">上传的文件大小限制：</label>
				<div class="col-sm-10">
				    <input    type="text" name="file_max_size" placeholder="上传的文件大小限制" value="{$web_upload.file_max_size}" class="col-xs-4"/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 文件上传大小单位：kb (0-不做限制)</div>
				</div>
				
			</div>
			<div class="space-4"></div>
		    <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">允许上传的文件后缀：</label>
				<div class="col-sm-10">
					<input type="text"  name="file_allow_suf" placeholder="允许上传的文件后缀" value="{$web_upload.file_allow_suf}" class="col-xs-4"/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 多个后缀用逗号隔开，不填写则不限制类型</div>
				</div>
				
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">上传的图片大小限制：</label>
				<div class="col-sm-10">
				    <input   name="img_max_size" type="text" placeholder="上传的文件大小限制" value="{$web_upload.img_max_size}"   class="col-xs-4"/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 图片上传大小单位：kb (0-不做限制)</div>
				</div>
				
			</div>
			<div class="space-4"></div>
		    <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">允许上传的图片后缀：</label>
				<div class="col-sm-10">
					<input type="text"  name="img_allow_suf" placeholder="允许图片的文件后缀" value="{$web_upload.img_allow_suf}"  class="col-xs-4"/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 多个后缀用逗号隔开，不填写则不限制类型</div>
				</div>
				
			</div>
			<div class="space-4"></div>
			<h3 class="form-section">缩略图
			    <small>下列设置图像尺寸为上传生成缩略图尺寸,以像素px为单位。</small>
			 </h3>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">小尺寸：</label>
				<div class="col-md-10">
        
			        <div class="col-xs-3">
			            <div class="input-group input-group-sm">
			                  <span class="input-group-addon">宽度</span>
			                  <input class="form-control" name="thumb_min_width"  value="{$web_upload.thumb_min_width}" type="text">
			            </div>
			       </div>
			       <div class="col-xs-3">
			           <div class="input-group input-group-sm">
			                <span class="input-group-addon">高度</span>
			                <input class="form-control" name="thumb_min_height" value="{$web_upload.thumb_min_height}" type="text">
			            </div>
			        </div>
			        
			    </div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">中等尺寸：</label>
				<div class="col-md-10">
        
			        <div class="col-xs-3">
			            <div class="input-group input-group-sm">
			                  <span class="input-group-addon">宽度</span>
			                  <input class="form-control" name="thumb_mid_width" value="{$web_upload.thumb_mid_width}" type="text">
			            </div>
			       </div>
			       <div class="col-xs-3">
			           <div class="input-group input-group-sm">
			                <span class="input-group-addon">高度</span>
			                <input class="form-control" name="thumb_mid_height" value="{$web_upload.thumb_mid_height}" type="text">
			            </div>
			        </div>
			        
			    </div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">大尺寸：</label>
				<div class="col-md-10">
        
			        <div class="col-xs-3">
			            <div class="input-group input-group-sm">
			                  <span class="input-group-addon">宽度</span>
			                  <input class="form-control" name="thumb_max_width" value="{$web_upload.thumb_max_width}" type="text">
			            </div>
			       </div>
			       <div class="col-xs-3">
			           <div class="input-group input-group-sm">
			                <span class="input-group-addon">高度</span>
			                <input class="form-control" name="thumb_max_height" value="{$web_upload.thumb_max_height}" type="text">
			            </div>
			        </div>
			        
			    </div>
			</div>
			<div class="space-4"></div>
			<h3 class="form-section">添加水印<small>给上传的图片添加水印。</small>
			 </h3>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 水印类型：  </label>
				<div class="col-sm-10">
					<label>
						<input name="water_type" {$web_upload.water_type?"checked":""} type="radio" value="1" checked class="ace">
						<span class="lbl"> 图片水印 </span>&nbsp;&nbsp;
					</label>
					<label>
						<input name="water_type" {$web_upload.water_type?"":"checked"} type="radio" value="0" class="ace">
						<span class="lbl"> 文字水印 </span>
					</label>
				</div>
			</div>
            <div class="space-4"></div>
            <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 水印位置：  </label>
				<div class="col-sm-3">
					<label class="col-sm-4">
						<input name="water_place" {if condition="$web_upload.water_place eq 1"}checked{/if} type="radio" value="1" checked class="ace">
						<span class="lbl"> 左上 </span>&nbsp;&nbsp;
					</label>
					<label class="col-sm-4 ">
						<input name="water_place" {if condition="$web_upload.water_place eq 2"}checked{/if} type="radio" value="2" class="ace">
						<span class="lbl"> 上 </span>
					</label>
					<label class="col-sm-4">
						<input name="water_place" {if condition="$web_upload.water_place eq 3"}checked{/if} type="radio" value="3" checked class="ace">
						<span class="lbl"> 右上 </span>&nbsp;&nbsp;
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 4"}checked{/if} type="radio" value="4" class="ace">
						<span class="lbl"> 左 </span>
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 5"}checked{/if} type="radio" value="5" checked class="ace">
						<span class="lbl"> 中 </span>&nbsp;&nbsp;
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 6"}checked{/if} type="radio" value="6" class="ace">
						<span class="lbl"> 右 </span>
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 7"}checked{/if} type="radio" value="7" class="ace">
						<span class="lbl"> 左下 </span>
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 8"}checked{/if} type="radio" value="8" class="ace">
						<span class="lbl"> 下 </span>
					</label>
					<label class="col-sm-4 padding-top-30">
						<input name="water_place" {if condition="$web_upload.water_place eq 9"}checked{/if} type="radio" value="9" class="ace">
						<span class="lbl"> 右下 </span>
					</label>
				</div>
			</div>
            <div class="space-4"></div>
            <div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">水印图：</label>
				<div class="col-sm-10">
				    <div class="col-sm-2">
						<a href="javascript:;" class="file">
							<input name="img" id="img_upload" type="file">
							<i class="fa fa-cloud-upload "></i>上传水印图
						</a>
					</div>
					<div class="col-sm-10 help-block"><i class="fa fa-info-circle color-info1"></i> 用于图片加水印</div>
					<div class="file_img_show col-sm-12">
					    <div class="img col-xs-2" id="show_upload_img">
					      <i class="ace-icon fa fa-times red remove_upload_img"></i>
					      <img src='{$web_upload.water_img|get_img}' alt="">
					      <input type="hidden"  name="water_img" value="{$web_upload.water_img}">
					    </div>
					</div>
				</div>
			</div>
			<div class="space-4"></div>  
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="form-field-1">水印透明度：</label>
				<div class="col-sm-10">
				    <input   name="water_alpha" type="text" placeholder="后台分页数目"  class="col-xs-4" value="{$web_upload.water_alpha}"/>
					<div class="col-sm-5 help-block"><i class="fa fa-info-circle color-info1"></i> 水印透明度0 ~ 100</div>
				</div>
				
			</div>
			<div class="space-4"></div>
			<div class="clearfix">
				<div class="col-md-offset-3 col-md-9 ">
					<button class="btn btn-info btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-check bigger-110"></i>
						提交并保存
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn btn-success btn-sm btn-radius" type="submit">
						<i class="ace-icon fa fa-undo bigger-110"></i>
						重置
					</button>
				</div>
			</div>

			
		</form>
	</div><!-- /.col -->
</div><!-- /.row -->
{/block}
{block name="script"}

<script type="text/javascript">
jQuery(function($) {
//spinner
var spinner = $( "#spinner" ).spinner({
	create: function( event, ui ) {
		//add custom classes and icons
		$(this)
		.next().addClass('btn btn-success').html('<i class="ace-icon fa fa-plus"></i>')
		.next().addClass('btn btn-danger').html('<i class="ace-icon fa fa-minus"></i>')
		
		//larger buttons on touch devices
		if('touchstart' in document.documentElement) 
			$(this).closest('.ui-spinner').addClass('ui-spinner-touch');
	}
});
})
</script>
{/block}
